package com.letv.app.ljodfh.beans;

import android.os.Parcel;
import android.os.Parcelable;

import com.ruihang.generalibrary.ui.util.IListData;
import com.letv.app.ljodfh.ui.datainf.IColumnData;

import java.io.Serializable;

/**
 * Created by liuyu on 2017/8/8.
 */

public class FChannel implements Serializable, IColumnData, Parcelable {

    private static final long serialVersionUID = 739170970804376591L;
    /**
     * channelId : 150
     * channelName : 直播
     * channelUrl : /node/150
     * channelType : 2
     * subChannelType : 3
     */

    private String channelId;
    private String channelName;
    private String channelUrl;
    private String channelType;
    private String subChannelType;
    private String liveUrl;
    private String channelImage;
//    private String liveProgrammeList;

    private boolean isChoice;


    protected FChannel(Parcel in) {
        channelId = in.readString();
        channelName = in.readString();
        channelUrl = in.readString();
        channelType = in.readString();
        subChannelType = in.readString();
        liveUrl = in.readString();
        channelImage = in.readString();
        isChoice = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(channelId);
        dest.writeString(channelName);
        dest.writeString(channelUrl);
        dest.writeString(channelType);
        dest.writeString(subChannelType);
        dest.writeString(liveUrl);
        dest.writeString(channelImage);
        dest.writeByte((byte) (isChoice ? 1 : 0));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<FChannel> CREATOR = new Creator<FChannel>() {
        @Override
        public FChannel createFromParcel(Parcel in) {
            return new FChannel(in);
        }

        @Override
        public FChannel[] newArray(int size) {
            return new FChannel[size];
        }
    };

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getChannelUrl() {
        return channelUrl;
    }

    public void setChannelUrl(String channelUrl) {
        this.channelUrl = channelUrl;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public String getSubChannelType() {
        return subChannelType;
    }

    public void setSubChannelType(String subChannelType) {
        this.subChannelType = subChannelType;
    }

    public boolean isChoice() {
        return isChoice;
    }

    public void setChoice(boolean choice) {
        isChoice = choice;
    }

    public String getLiveUrl() {
        return liveUrl;
    }

    public void setLiveUrl(String liveUrl) {
        this.liveUrl = liveUrl;
    }

    @Override
    public String getDataTitle() {
        return null;
    }

    @Override
    public String getDataImg() {
        return null;
    }

    @Override
    public String getDataTag() {
        return null;
    }

    @Override
    public String getDataId() {
        return channelId;
    }

    @Override
    public int getDataType() {
        return 0;
    }

    @Override
    public int getDataViewType() {
        return 0;
    }

    @Override
    public IListData getOwner() {
        return null;
    }

    @Override
    public boolean isSubscribe() {
        return false;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getChannelImage() {
        return channelImage;
    }

    public void setChannelImage(String channelImage) {
        this.channelImage = channelImage;
    }
//
//    public String getLiveProgrammeList() {
//        return liveProgrammeList;
//    }
//
//    public void setLiveProgrammeList(String liveProgrammeList) {
//        this.liveProgrammeList = liveProgrammeList;
//    }
}
